//
//  OplightningView.m
//  LoveBeeProject
//
//  Created by skywalker on 17/1/4.
//  Copyright © 2017年 斯芬克斯. All rights reserved.
//

#import "OplightningView.h"

@implementation OplightningView
-(instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame]) {
        self.backgroundColor=[UIColor whiteColor];
        
        UIView * lineView=[[UIView alloc]init];
        lineView.backgroundColor= [UIColor colorWithRed:0.992 green:0.831 blue:0.192 alpha:1.000];
        [self addSubview:lineView];
        
        UILabel * lightLabel=[[UILabel alloc]init];
        lightLabel.text=@"闪送超市";
        lightLabel.font = [UIFont systemFontOfSize:15];
        [lightLabel sizeToFit];
        [self addSubview:lightLabel];
        
        
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(3);
            make.height.mas_equalTo(15);
            make.leading.equalTo(self).offset(10);
            make.centerY.equalTo(self);
            
        }];
        
        [lightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(lineView).offset(5);
            make.centerY.equalTo(self);
        }];
        
    }
    return self;
}


@end
